<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateContentTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */


    public function up()
    {
        Schema::create('content', function(Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->default(0)->comment('用户id');
            $table->integer('img_id')->default(0)->comment('展示图id');
            $table->string('title')->nullable()->comment('标题');
            $table->string('desc')->nullable()->comment('描述');
            $table->string('link_url')->nullable()->comment('链接地址');
            $table->text('content')->nullable()->comment('内容');
            $table->integer('read_num')->default(0)->comment('阅读数');
            $table->integer('classify_id')->default(0)->comment('分类id');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
